package io.renren.modules.service_controller.dao;

import io.renren.modules.service_controller.entity.ServiceControllerEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.ArrayList;
import java.util.Map;

/**
 * 菜单管理
 * 
 * @author CK
 * @email 779949398@qq.com
 * @date 2021-12-09 19:24:30
 */
@Mapper
public interface ServiceControllerDao extends BaseMapper<ServiceControllerEntity> {
    @Update("UPDATE service_controller SET show_status=1 where menu_id = #{menu_id}")
    void UpdateState(int menu_id);

    @Update("UPDATE service_controller SET show_status=0 where menu_id = #{menu_id}")
    void UpdateState1(int menu_id);
    @Update("UPDATE service_controller SET show_status=1 where menu_code = #{menu_code}")
    void UpdateState_code1(String menu_Code);

    @Update("UPDATE service_controller SET show_status=0 where menu_code = #{menu_code}")
    void UpdateState_code2(String menu_Code);

    @Select("SELECT show_status FROM service_controller WHERE menu_id = #{menu_id}")
    int getstate(int menu_id);

    @Select("SELECT colony,example FROM service_controller WHERE menu_code = #{menu_code}")
    Map<String, Object> get_coloAndExam(String menu_Code);

	
}
